package com.zjw.spring.model;

/**
 * spring life cycle test
 * @author zjw
 *
 */
public class LifeCycleBean {

	private int id;
	private String name;

	public LifeCycleBean() {
		super();
	}

	public LifeCycleBean(int id, String name) {
		this.id = id;
		this.name = name;
		System.out.println("LifeCycleBean(int "+id+",String "+name+")");
	}
	
	private void init(){
		System.out.println("init method executed....");
	}

	private void destroy(){
		System.out.println("destroy method executed....");
	}
	@Override
	public String toString() {
		return "LifeCycleBean [id=" + id + ", name=" + name + "]";
	}
	
	
	
	
}
